.class Lcom/htc/android/footprints/view/MediaControlPanelEditMode$4;
.super Ljava/lang/Object;
.source "MediaControlPanelEditMode.java"

# interfaces
.implements Lcom/htc/android/footprints/commonui/SwitchButton$OnCheckedChangeListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/htc/android/footprints/view/MediaControlPanelEditMode;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;


# direct methods
.method constructor <init>(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)V
    .locals 0
    .parameter

    .prologue
    .line 210
    iput-object p1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$4;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onCheckedChanged(Lcom/htc/android/footprints/commonui/SwitchButton;Z)V
    .locals 4
    .parameter "switchbutton"
    .parameter "flag"

    .prologue
    .line 211
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$4;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v1, v1, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    if-nez v1, :cond_0

    .line 228
    :goto_0
    return-void

    .line 212
    :cond_0
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$4;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v1, v1, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/voice/Recorder;->sampleFile()Ljava/io/File;

    move-result-object v1

    if-nez v1, :cond_1

    .line 213
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$4;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$4;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    invoke-virtual {v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f0a0074

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    #calls: Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->showToast(Ljava/lang/String;)V
    invoke-static {v1, v2}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->access$100(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;Ljava/lang/String;)V

    .line 214
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$4;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v1, v1, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mPlayButton:Lcom/htc/android/footprints/commonui/SwitchButton;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/htc/android/footprints/commonui/SwitchButton;->setChecked(Z)V

    goto :goto_0

    .line 218
    :cond_1
    if-eqz p2, :cond_2

    .line 219
    :try_start_0
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$4;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v1, v1, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/voice/Recorder;->startPlayback()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 227
    :goto_1
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$4;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    #calls: Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->updateUI()V
    invoke-static {v1}, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->access$200(Lcom/htc/android/footprints/view/MediaControlPanelEditMode;)V

    goto :goto_0

    .line 221
    :cond_2
    :try_start_1
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelEditMode$4;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelEditMode;

    iget-object v1, v1, Lcom/htc/android/footprints/view/MediaControlPanelEditMode;->mRecorder:Lcom/htc/android/footprints/utils/voice/Recorder;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/voice/Recorder;->stopPlayback()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_1

    .line 224
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 225
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_1
.end method
